﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="CatchSingleParseItem.aspx.cs"
    Inherits="Manage_Cms_CatchSingleParseItem" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
    <!--#include file="../js/html_head.inc"-->
    <link rel="stylesheet" type="text/css" href="../Themes/<%=ManageHelper.GetTheme()%>/style.css" />
    <style type="text/css">
        .debug{
            font-weight:normal;color:red;
            width:60px;height:20px;background:#FFFCCC;border:1px solid #999999;cursor:pointer;
            padding-left:15px;
        }
    </style>

    <script type="text/javascript" language="javascript">
        function frmSubmit(CurStep)
        {
            $$("step").value=CurStep;
            /*if($$("url").value!="")
            {
                $$("CatchUrl").value=$$("url").value;
            }*/
            $$("myForm").action="CatchSingleItem.aspx";
            $$("myForm").target="_new";
            $$("myForm").submit();
        }
        function edtiSaveSub(act)
        {
            $$("myForm").target="";
            $$("myForm").action=act;
            $$("myForm").submit();
        }
        function showurl(objvalue)
        {
            $$("CatchUrl").value=objvalue;
        }
    </script>

</head>
<body>
    <%=ManageHelper.PageSucMsg()!=""?"<div class='msg_succeed'>"+ManageHelper.PageSucMsg()+"</div>":""%>
    <div class="mycolumn">
        <div class="columntitle">
            <%=ActName %>
            采集解析</div>
        <form id="myForm" name="myForm" method="post" action="" onsubmit="return validator(this)">
            <table cellpadding="2" width="100%" style="">
                <tr>
                    <td colspan="2">
                        <table>
                            <tr>
                                <td align="left" style="width: 140px;">
                                    <img src="../pic/icons/help.gif" alt="解析规则名称" onclick="helpInf(this)" valid="required"
                                        errmsg="请输入规则名称" />
                                    名称：</td>
                                <td align="left">
                                    <input type="text" name="ParseContentName" value="<%=ModelCmsCatchParseContent.ParseContentName %>"
                                        style="width: 200px;" valid="required" errmsg="请输入规则名称" /><input type="hidden" value="<%=ParseID %>"
                                            id="pcid" name="pcid" />
                                </td>
                            </tr>
                            <tr>
                                <td align="left" style="width: 140px;">
                                    <img src="../pic/icons/help.gif" alt="是否启用" onclick="helpInf(this)" valid="required" />
                                    是否启用：</td>
                                <td align="left">
                                    <input id="IsUsing" type="checkbox" name="IsUsing" style="width: 15px; height: 15px;" <%=ModelCmsCatchParseContent.IsUsing==1?"checked":"" %>
                                        value="1" />启用
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <div class="columntitle">
                            内容规则</div>
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <table>
                            <!-- 内容 -->
                            <tr>
                                <td align="left" width="140" height="30">
                                    <img src="../pic/icons/help.gif" alt="调试内容" onclick="helpInf(this)" />
                                    要采集的网页URL：</td>
                                <td align="left">
                                    <input type="text" value="" id="url" name="url" valid="required" errmsg="请输入内容目标地址" />
                                </td>
                            </tr>
                            <tr>
                                <td align="left" width="140">
                                    <img src="../pic/icons/help.gif" alt="内容页面编码" onclick="helpInf(this)" />
                                    页面编码：</td>
                                <td align="left">
                                    <input type="text" name="ContentEncoding" value="<%=ModelCmsCatchParseContent.ContentEncoding%>"
                                        size="1" errmsg="内容页面编码" />
                                    <a href="javascript:frmSubmit(6)"><font class="debug">调试6</font> </a>空为gb2312
                                </td>
                            </tr>
                            <tr>
                                <td align="left" width="140">
                                    <img src="../pic/icons/help.gif" alt="内容定位开头" onclick="helpInf(this)" />
                                    定位开头：</td>
                                <td align="left">
                                    <textarea name="ContentParseBegin" valid="required" errmsg="请输入内容定位开头" style="width: 400px;
                                        height: 60px;" class="colorblur"><%=ModelCmsCatchParseContent.ContentParseBegin%></textarea>
                                </td>
                            </tr>
                            <tr>
                                <td align="left" width="140">
                                    <img src="../pic/icons/help.gif" alt="内容定位结尾" onclick="helpInf(this)" />
                                    定位结尾：</td>
                                <td align="left">
                                    <textarea name="ContentParseEnd" valid="required" errmsg="请输入内容定位结尾" style="width: 400px;
                                        height: 60px;" class="colorblur"><%=ModelCmsCatchParseContent.ContentParseEnd%></textarea>
                                    <a href="javascript:frmSubmit(7)"><font class="debug">调试7</font> </a>
                                </td>
                            </tr>
                            <tr>
                                <td align="left" width="140">
                                    <img src="../pic/icons/help.gif" alt="内容格式化XHTML标签" onclick="helpInf(this)" />
                                    格式化XHTML标签：</td>
                                <td align="left">
                                    <textarea name="ContentParseTags" valid="required" errmsg="请输入内容格式化XHTML标签" style="width: 400px;
                                        height: 60px;" class="colorblur"><%=ModelCmsCatchParseContent.ContentParseTags%></textarea>
                                </td>
                            </tr>
                            <tr>
                                <td align="left" width="140">
                                    <img src="../pic/icons/help.gif" alt="内容格式化XHTML属性" onclick="helpInf(this)" />
                                    格式化XHTML属性：</td>
                                <td align="left">
                                    <textarea name="ContentParseAttrs" valid="required" errmsg="请输入内容格式化XHTML属性" style="width: 400px;
                                        height: 60px;" class="colorblur"><%=ModelCmsCatchParseContent.ContentParseAttrs%></textarea>
                                    <a href="javascript:frmSubmit(8)"><font class="debug">调试8</font> </a>
                                </td>
                            </tr>
                            <tr>
                                <td align="left" width="140">
                                    <img src="../pic/icons/help.gif" alt="内容解析规则" onclick="helpInf(this)" />
                                    内容解析规则：</td>
                                <td align="left">
                                    <textarea name="ContentParseRule" valid="required" errmsg="请输入内容解析规则" style="width: 400px;
                                        height: 60px;" class="colorblur"><%=ModelCmsCatchParseContent.ContentParseRule%></textarea>
                                    <a href="javascript:frmSubmit(9)"><font class="debug">调试9</font> </a>
                                </td>
                            </tr>
                            <tr>
                                <td align="left" width="140">
                                    <img src="../pic/icons/help.gif" alt="分页解析规则" />
                                    分页解析规则：</td>
                                <td align="left">
                                    <textarea name="ContentPageParseRule" style="width: 400px; height: 60px;" class="colorblur"><%=ModelCmsCatchParseContent.ContentPageParseRule%></textarea>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr <%=ModelCmsCatchParseContent.ParseContentID>0?"":"style='display:none'" %>>
                    <td colspan="2">
                        <table width="100%">
                            <tr>
                                <td colspan="2">
                                    <div class="columntitle">
                                        采集解析内容调整</div>
                                </td>
                            </tr>
                            <tr>
                                <td class="tdbutton">
                                    <input type="button" value="添加解析内容" onclick="RegContentAddPage(<%=ModelCmsCatchParseContent.ParseContentID %>)" />
                                </td>
                            </tr>
                            <tr>
                                <td colspan="2" align="left">
                                    <!-- 采集解析内容调整    -->
                                    <div class="column" style="width: 100%" id="BoundData">
                                        <%=BoundData(ModelCmsCatchParseContent.ParseContentID)%>
                                    </div>
                                    <a href="javascript:frmSubmit(10)"><font class="debug">调试10</font> </a>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td colspan="2" align="center" class="tdbutton">
                        <input type="button" name="btnAdd" value="保 存" onclick="edtiSaveSub('?act=<%=ActFlag %>')" />
                        <input type="button" name="Cancel" value="返 回" onclick="javascript:window.history.go(-1)"
                            class="button" />
                        <input type="hidden" value="<%=ModelCmsCatchParseContent.ParseContentID %>" name="ParseContentID" />
                        <input type="hidden" name="step" id="step" value="" />
                    </td>
                </tr>
            </table>
        </form>
    </div>
    <div class="mycolumn" id="RegDiv" style="width: 500px; border: 2px solid #86a1ba;
        display: none; position: absolute; top: 500px; left: 180px; background: #FFFFFF;">
    </div>
</body>
</html>
